package com.project.internship.utils;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

/**
 * 获得当前年的String类型
 */
public class YearUtils {

    public static String getCurrentYear(){
        LocalDate date = LocalDate.now(); // get the current date
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy");

        return date.format(formatter);
    }

}
